SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for __PREFIX__expressquery
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__expressquery` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT '',
  `express` varchar(50) DEFAULT '',
  `coding` varchar(10) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=utf8 COMMENT='快递公司表';

-- ----------------------------
-- Records of __PREFIX__expressquery
-- ----------------------------
INSERT INTO `__PREFIX__expressquery` VALUES ('1', '顺丰', 'shunfeng', 'SF');
INSERT INTO `__PREFIX__expressquery` VALUES ('2', '申通', 'shentong', 'STO');
INSERT INTO `__PREFIX__expressquery` VALUES ('3', '韵达快运', 'yunda', 'YD');
INSERT INTO `__PREFIX__expressquery` VALUES ('4', '天天快递', 'tiantian', 'HHTT');
INSERT INTO `__PREFIX__expressquery` VALUES ('5', '圆通速递', 'yuantong', 'YTO');
INSERT INTO `__PREFIX__expressquery` VALUES ('6', '中通速递', 'zhongtong', 'ZTO');
INSERT INTO `__PREFIX__expressquery` VALUES ('7', 'ems快递', 'ems', 'EMS');
INSERT INTO `__PREFIX__expressquery` VALUES ('8', '百世快递', 'huitongkuaidi', 'HTKY');
INSERT INTO `__PREFIX__expressquery` VALUES ('9', '全峰快递', 'quanfengkuaidi', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('10', '宅急送', 'zhaijisong', 'ZJS');
INSERT INTO `__PREFIX__expressquery` VALUES ('11', 'aae全球专递', 'aae', 'AAE');
INSERT INTO `__PREFIX__expressquery` VALUES ('12', '安捷快递', 'anjie', 'AJ');
INSERT INTO `__PREFIX__expressquery` VALUES ('13', '安信达快递', 'anxindakuaixi', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('14', '彪记快递', 'biaojikuaidi', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('15', 'bht', 'bht', 'BHT');
INSERT INTO `__PREFIX__expressquery` VALUES ('16', '百福东方国际物流', 'baifudongfang', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('17', '中国东方（COE）', 'coe', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('18', '长宇物流', 'changyuwuliu', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('19', '大田物流', 'datianwuliu', 'DTWL');
INSERT INTO `__PREFIX__expressquery` VALUES ('20', '德邦物流', 'debangwuliu', 'DBL');
INSERT INTO `__PREFIX__expressquery` VALUES ('21', 'dhl', 'dhl', 'DHL');
INSERT INTO `__PREFIX__expressquery` VALUES ('22', 'dpex', 'dpex', 'DPEX');
INSERT INTO `__PREFIX__expressquery` VALUES ('23', 'd速快递', 'dsukuaidi', 'DSWL');
INSERT INTO `__PREFIX__expressquery` VALUES ('24', '递四方', 'disifang', 'D4PX');
INSERT INTO `__PREFIX__expressquery` VALUES ('25', 'fedex（国外）', 'fedex', 'FEDEX_GJ');
INSERT INTO `__PREFIX__expressquery` VALUES ('26', '飞康达物流', 'feikangda', 'FKD');
INSERT INTO `__PREFIX__expressquery` VALUES ('27', '凤凰快递', 'fenghuangkuaidi', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('28', '飞快达', 'feikuaida', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('29', '国通快递', 'guotongkuaidi', 'GTO');
INSERT INTO `__PREFIX__expressquery` VALUES ('30', '港中能达物流', 'ganzhongnengda', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('31', '广东邮政物流', 'guangdongyouzhengwuliu', 'GDEMS');
INSERT INTO `__PREFIX__expressquery` VALUES ('32', '共速达', 'gongsuda', 'GSD');
INSERT INTO `__PREFIX__expressquery` VALUES ('33', '恒路物流', 'hengluwuliu', 'HLWL');
INSERT INTO `__PREFIX__expressquery` VALUES ('34', '华夏龙物流', 'huaxialongwuliu', 'HXLWL');
INSERT INTO `__PREFIX__expressquery` VALUES ('35', '海红', 'haihongwangsong', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('36', '海外环球', 'haiwaihuanqiu', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('37', '佳怡物流', 'jiayiwuliu', 'JYWL');
INSERT INTO `__PREFIX__expressquery` VALUES ('38', '京广速递', 'jinguangsudikuaijian', 'JGSD');
INSERT INTO `__PREFIX__expressquery` VALUES ('39', '急先达', 'jixianda', 'JXD');
INSERT INTO `__PREFIX__expressquery` VALUES ('40', '佳吉物流', 'jiajiwuliu', 'CNEX');
INSERT INTO `__PREFIX__expressquery` VALUES ('41', '加运美物流', 'jymwl', 'JYM');
INSERT INTO `__PREFIX__expressquery` VALUES ('42', '金大物流', 'jindawuliu', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('43', '嘉里大通', 'jialidatong', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('44', '晋越快递', 'jykd', 'JYKD');
INSERT INTO `__PREFIX__expressquery` VALUES ('45', '快捷速递', 'kuaijiesudi', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('46', '联邦快递（国内）', 'lianb', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('47', '联昊通物流', 'lianhaowuliu', 'LHT');
INSERT INTO `__PREFIX__expressquery` VALUES ('48', '龙邦物流', 'longbanwuliu', 'LB');
INSERT INTO `__PREFIX__expressquery` VALUES ('49', '立即送', 'lijisong', 'LJSKD');
INSERT INTO `__PREFIX__expressquery` VALUES ('50', '乐捷递', 'lejiedi', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('51', '民航快递', 'minghangkuaidi', 'MHKD');
INSERT INTO `__PREFIX__expressquery` VALUES ('52', '美国快递', 'meiguokuaidi', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('53', '门对门', 'menduimen', 'MDM');
INSERT INTO `__PREFIX__expressquery` VALUES ('54', 'OCS', 'ocs', 'OCS');
INSERT INTO `__PREFIX__expressquery` VALUES ('55', '配思货运', 'peisihuoyunkuaidi', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('56', '全晨快递', 'quanchenkuaidi', 'QCKD');
INSERT INTO `__PREFIX__expressquery` VALUES ('57', '全际通物流', 'quanjitong', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('58', '全日通快递', 'quanritongkuaidi', 'QRT');
INSERT INTO `__PREFIX__expressquery` VALUES ('59', '全一快递', 'quanyikuaidi', 'UAPEX');
INSERT INTO `__PREFIX__expressquery` VALUES ('60', '如风达', 'rufengda', 'RFD');
INSERT INTO `__PREFIX__expressquery` VALUES ('61', '三态速递', 'santaisudi', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('62', '盛辉物流', 'shenghuiwuliu', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('63', '速尔物流', 'suer', 'SURE');
INSERT INTO `__PREFIX__expressquery` VALUES ('64', '盛丰物流', 'shengfeng', 'SFWL');
INSERT INTO `__PREFIX__expressquery` VALUES ('65', '赛澳递', 'saiaodi', 'SAD');
INSERT INTO `__PREFIX__expressquery` VALUES ('66', '天地华宇', 'tiandihuayu', 'HOAU');
INSERT INTO `__PREFIX__expressquery` VALUES ('67', 'tnt', 'tnt', 'TNT');
INSERT INTO `__PREFIX__expressquery` VALUES ('68', 'ups', 'ups', 'UPS');
INSERT INTO `__PREFIX__expressquery` VALUES ('69', '万家物流', 'wanjiawuliu', 'WJWL');
INSERT INTO `__PREFIX__expressquery` VALUES ('70', '文捷航空速递', 'wenjiesudi', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('71', '伍圆', 'wuyuan', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('72', '万象物流', 'wxwl', 'WXWL');
INSERT INTO `__PREFIX__expressquery` VALUES ('73', '新邦物流', 'xinbangwuliu', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('74', '信丰物流', 'xinfengwuliu', 'XFEX');
INSERT INTO `__PREFIX__expressquery` VALUES ('75', '亚风速递', 'yafengsudi', 'YFSD');
INSERT INTO `__PREFIX__expressquery` VALUES ('76', '一邦速递', 'yibangwuliu', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('77', '优速物流', 'youshuwuliu', 'UC');
INSERT INTO `__PREFIX__expressquery` VALUES ('78', '邮政快递包裹', 'youzhengguonei', 'YZBK');
INSERT INTO `__PREFIX__expressquery` VALUES ('79', '邮政国际包裹挂号信', 'youzhengguoji', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('80', '远成物流', 'yuanchengwuliu', 'YCWL');
INSERT INTO `__PREFIX__expressquery` VALUES ('81', '源伟丰快递', 'yuanweifeng', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('82', '元智捷诚快递', 'yuanzhijiecheng', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('83', '运通快递', 'yuntongkuaidi', 'YTKD');
INSERT INTO `__PREFIX__expressquery` VALUES ('84', '越丰物流', 'yuefengwuliu', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('85', '源安达', 'yad', 'YADEX');
INSERT INTO `__PREFIX__expressquery` VALUES ('86', '银捷速递', 'yinjiesudi', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('87', '中铁快运', 'zhongtiekuaiyun', 'ZTKY');
INSERT INTO `__PREFIX__expressquery` VALUES ('88', '中邮物流', 'zhongyouwuliu', 'ZYKD');
INSERT INTO `__PREFIX__expressquery` VALUES ('89', '忠信达', 'zhongxinda', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('90', '芝麻开门', 'zhimakaimen', '');
INSERT INTO `__PREFIX__expressquery` VALUES ('91', '安能物流', 'annengwuliu', 'ANE');
INSERT INTO `__PREFIX__expressquery` VALUES ('92', '京东快递', 'jd', 'JD');
INSERT INTO `__PREFIX__expressquery` VALUES ('93', '微特派', 'weitepai', 'WTP');
INSERT INTO `__PREFIX__expressquery` VALUES ('94', '九曳供应链', 'jiuyescm', 'JIUYE');
INSERT INTO `__PREFIX__expressquery` VALUES ('95', '跨越速运', 'kuayue', 'KYSY');

-- ----------------------------
-- Table structure for __PREFIX__expressquery_cache
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__expressquery_cache` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `expresssn` varchar(50) DEFAULT NULL,
  `express` varchar(50) DEFAULT NULL,
  `lasttime` bigint(16) NOT NULL,
  `datas` text,
  PRIMARY KEY (`id`),
  KEY `idx_expresssn` (`expresssn`),
  KEY `idx_express` (`express`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='查询缓存表';

-- ----------------------------
-- Records of __PREFIX__expressquery_cache
-- ----------------------------

-- ----------------------------
-- Table structure for __PREFIX__expressquery_config
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__expressquery_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `express_type` enum('kuaidiniao','kuaidi100','ali') NOT NULL DEFAULT 'kuaidiniao' COMMENT '类型选择',
  `express_bird_userid` varchar(100) DEFAULT NULL COMMENT '用户ID',
  `express_bird_apikey` varchar(100) DEFAULT NULL COMMENT 'API key',
  `express_bird_customer_name` varchar(100) DEFAULT NULL COMMENT '京东商家编码',
  `express_bird_cache` int(10) unsigned DEFAULT '0' COMMENT '缓存时长（分钟）',
  `kuaidi100_type` enum('free','company') NOT NULL DEFAULT 'free' COMMENT '接口类型',
  `apikey` varchar(100) DEFAULT NULL COMMENT '授权密匙(Key)',
  `customer` varchar(100) DEFAULT NULL COMMENT '公司编号(Customer)',
  `aliappcode` varchar(100) DEFAULT NULL COMMENT '阿里云APPCODE',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='物流接口配置表';

BEGIN;
ALTER TABLE `__PREFIX__expressquery_cache` CHANGE `lasttime` `lasttime` BIGINT(16) NOT NULL;
COMMIT;